<?php

class Utilities_m extends CI_Model {

    function __construct() {
        parent::__construct();
        $this->load->database();
    }

    public function send_email($to, $subject, $content) {
        $this->load->library('email');

        $this->email->from('system@afteridea.com', 'Afteridea System');
        $this->email->to($to);

        $this->email->subject($subject);
        $this->email->message($content);

        $this->email->send();

        return $this->email->print_debugger();
    }
    
    public function new_order_notification($to){
        $content = 'Please check afteridea system. New order has been created and need your review.';
        $subject = 'New order created in Afteridea.com';
        $this->send_email($to,$subject,$content);
    }

}

?>